//导入axios请求
import request from '@/utils/request'
// 引入类型约束
import type  {categoryListModel} from "@/api/product/model/CategoryModel"
// 三级分类的接口
enum Api {
// 一级分类
getCategory1ListApi='/admin/product/getCategory1',


// 2级分类
getCategory2ListApi='/admin/product/getCategory2',



//三级分类
getCategory3ListApi='/admin/product/getCategory3',


}
//获取一级分类的数据
export const reqgetCategory1ListData=()=>request.get<any,categoryListModel>(Api.getCategory1ListApi)
//获取二级分类的数据
export const reqgetCategory2ListData = (category1Id: number) => request.get<any, categoryListModel>(Api.getCategory2ListApi+`/${category1Id}`)
//获取三级分类的数据
export const reqgetCategory3ListData = (category2Id: number) => request.get<any, categoryListModel>(Api.getCategory3ListApi + `/${category2Id}`)
